// 展示用户信息
export const UserInfo = ({user})=>{
    const {name,age,hair} = user || {};
    return (
        user ? (
            <ul>
                <li>name:{name}</li>
                <li>age:{age}</li>
                <li>hair:{hair}</li>
            </ul>
        ):<p>loading</p>
    )
}